import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/v1/PermissionUser/Login',
    method: 'post',
    data
  })
}

export function updatePassword(data) {
  return request({
    url: '/api/v1/PermissionUser/UpdatePassword',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/api/v1/PermissionUser/GetInfo',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

// 获取系统基本配置
export function getBaseConfig(token) {
  return request({
    url: '/api/v1/SystemBasis/GetBaseConfig',
    method: 'get',
    params: { token }
  })
}
